<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<h:head>
	<title>Inscription</title>
	<h:outputStylesheet library="css" name="style.css"  />
</h:head>

<h:body>

	<ui:include src="header.xhtml"/>

	<div id="contenu">
	<p>
		<h:outputLabel value="#{msg['inscription.consigne']}"></h:outputLabel>
	</p>
	
	<h:form>
		<p>
			<h:outputLabel value="#{msg['label.pseudonyme']}"></h:outputLabel>
			<h:inputText id ="pseudo" value="#{beanUtilisateur.user.pseudo}" required="true" requiredMessage="#{msg['erreur.pseudo']}" validatorMessage="#{msg['erreur.pseudo_regex']}">
				<f:validateRegex pattern="^[\w]{3,20}$"></f:validateRegex>
			</h:inputText>
			
		</p>
		
		<p>
			<h:outputLabel value="#{msg['label.mot_de_passe']}"></h:outputLabel>
			<h:inputSecret id="password" value="#{beanUtilisateur.user.password}" required="true" requiredMessage="#{msg['erreur.mot_de_passe']}" validatorMessage="#{msg['erreur.mot_de_passe_regex']}">
				<f:validateRegex pattern="[a-zA-Z]+[0-9]+"></f:validateRegex>
				<f:validateLength minimum="6" maximum="15"></f:validateLength>
			</h:inputSecret>
			
		</p>
		
		<p>
			<h:commandButton type="submit" value="#{msg['bouton.inscription']}" action="#{beanUtilisateur.inscription}"></h:commandButton>
		
			<h:messages class="erreur"></h:messages>
		</p>
	</h:form>
	
	<p>
		<h:outputLabel value="#{msg['inscription.avantage']}"></h:outputLabel>
		<ul>
			<li><h:outputLabel value="#{msg['inscription.avantage1']}"></h:outputLabel></li>
			<li><h:outputLabel value="#{msg['inscription.avantage2']}"></h:outputLabel></li>
			<li><h:outputLabel value="#{msg['inscription.avantage3']}"></h:outputLabel></li>
		</ul>
	</p>
	
	</div>

	<ui:include src="footer.xhtml"/>

</h:body>

</html>